package com.ruoyi.erp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.erp.mapper.BzFaVouchersDetailMapper;
import com.ruoyi.erp.domain.BzFaVouchersDetail;
import com.ruoyi.erp.service.IBzFaVouchersDetailService;

/**
 * 资产变动Service业务层处理
 * 
 * @author ztj
 * @date 2023-04-18
 */
@Service
public class BzFaVouchersDetailServiceImpl implements IBzFaVouchersDetailService 
{
    @Autowired
    private BzFaVouchersDetailMapper bzFaVouchersDetailMapper;

    /**
     * 查询资产变动
     * 
     * @param id 资产变动主键
     * @return 资产变动
     */
    @Override
    public BzFaVouchersDetail selectBzFaVouchersDetailById(Long id)
    {
        return bzFaVouchersDetailMapper.selectBzFaVouchersDetailById(id);
    }
    @Override
    public List<BzFaVouchersDetail> selectBzFaVouchersDetailByIds(Long[] ids)
    {
        return bzFaVouchersDetailMapper.selectBzFaVouchersDetailByIds(ids);
    }
    /**
     * 查询资产变动列表
     * 
     * @param bzFaVouchersDetail 资产变动
     * @return 资产变动
     */
    @Override
    public List<BzFaVouchersDetail> selectBzFaVouchersDetailList(BzFaVouchersDetail bzFaVouchersDetail)
    {
        return bzFaVouchersDetailMapper.selectBzFaVouchersDetailList(bzFaVouchersDetail);
    }

    /**
     * 新增资产变动
     * 
     * @param bzFaVouchersDetail 资产变动
     * @return 结果
     */
    @Override
    public int insertBzFaVouchersDetail(BzFaVouchersDetail bzFaVouchersDetail)
    {
        bzFaVouchersDetail.setCreateTime(DateUtils.getNowDate());
        return bzFaVouchersDetailMapper.insertBzFaVouchersDetail(bzFaVouchersDetail);
    }

    /**
     * 修改资产变动
     * 
     * @param bzFaVouchersDetail 资产变动
     * @return 结果
     */
    @Override
    public int updateBzFaVouchersDetail(BzFaVouchersDetail bzFaVouchersDetail)
    {
        bzFaVouchersDetail.setUpdateTime(DateUtils.getNowDate());
        return bzFaVouchersDetailMapper.updateBzFaVouchersDetail(bzFaVouchersDetail);
    }

    @Override
    public int updateBzFaVouchersDetailIds(Long[] ids)
    {
        return bzFaVouchersDetailMapper.updateBzFaVouchersDetailIds(ids);
    }
    @Override
    public int updateBzFaVouchersDetailIdsFail(Long[] ids)
    {
        return bzFaVouchersDetailMapper.updateBzFaVouchersDetailIdsFail(ids);
    }
    @Override
    public int updateBzFaVouchersDetailIdErp(BzFaVouchersDetail bzFaVouchersDetail)
    {
        return bzFaVouchersDetailMapper.updateBzFaVouchersDetailIdErp(bzFaVouchersDetail);
    }
    /**
     * 批量删除资产变动
     * 
     * @param ids 需要删除的资产变动主键
     * @return 结果
     */
    @Override
    public int deleteBzFaVouchersDetailByIds(Long[] ids)
    {
        return bzFaVouchersDetailMapper.deleteBzFaVouchersDetailByIds(ids);
    }

    /**
     * 删除资产变动信息
     * 
     * @param id 资产变动主键
     * @return 结果
     */
    @Override
    public int deleteBzFaVouchersDetailById(Long id)
    {
        return bzFaVouchersDetailMapper.deleteBzFaVouchersDetailById(id);
    }
}
